import { store } from '@/config'
import type { REPORT_ID, REPORT_STATUS } from '@/enum'

export interface ListItem {
  id?: number
  name: string
  tId: REPORT_ID
  status: REPORT_STATUS
  remark: string
}

const useReportStore = defineStore('report', () => {
  const row = ref<ListItem>()
  function setRow(data: ListItem) {
    row.value = data
  }
  return { row, setRow }
})

/** 非setup中 */
export function useReportStoreHook() {
  return useReportStore(store)
}

export default useReportStore
